//
//  QYMoreCommentsCell.m
//  QingYue
//
//  Created by Zheng on 2017/6/16.
//  Copyright © 2017年 com.lanou.product_A. All rights reserved.
//

#import "QYMoreCommentsCell.h"
#import "QYMoreCommentsModel.h"

@implementation QYMoreCommentsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    _iconImgv.layer.cornerRadius = 30;
    _iconImgv.layer.masksToBounds = YES;
    
    [_thumbUpBtn setTitle:@"  1" forState:UIControlStateNormal];
    [_thumbUpBtn setTitleColor:RGB(120, 200, 150, 1) forState:UIControlStateNormal];
    [_bookNameBtn setTitleColor:RGB(120, 200, 150, 1) forState:UIControlStateNormal];    
}

- (IBAction)deleteBtnAction:(id)sender {
    _deleteBlock(_model.Isbn);
}

- (void)setModel:(QYMoreCommentsModel *)model {
    _model = model;

    _uNameLbl.text = _model.UserName;
    _timeLbl.text = _model.CommentTime;
    [_thumbUpBtn setTitle:[NSString stringWithFormat:@"  %@",_model.Count] forState:UIControlStateNormal];
    _contentLbl.text = _model.CommentCont;
    [_bookNameBtn setTitle:[NSString stringWithFormat:@"%@",_model.BookName] forState:UIControlStateNormal];
    
    [_iconImgv sd_setImageWithURL:[NSURL URLWithString:_model.UserHead] placeholderImage:nil];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
